{if $mode=="Remove"}
  {assign var='disabled' value="disabled=\"disabled\""}
{else}
  {assign var='disabled' value=""}
{/if}
<fieldset>
  <legend>General Info</legend>
  
  <p><label for="name">Name</label>
     <input type="text" name="name" id="name" maxlength="50" value="{$user->name}" {$disabled}/></p>
   
  <p><label for="username">Username</label>
     <input type="text" name="username" id="username" maxlength="30" value="{$user->username}" {$disabled}/></p>

  <p><label for="email">Email</label>
     <input type="text" name="email" id="email" maxlength="255" value="{$user->email}" {$disabled}/></p>

  <p><label for="type">Type</label>
     <select name="type" id="type" {$disabled}>{html_options values=$_types output=$_types selected=$user->type}</select>
  </p>
</fieldset>

{if $mode != "Remove"}
<fieldset>
  <legend onclick="$('PW').toggle();">Password</legend>
  <div id="PW">
    {if $mode=="Edit"}<small>Do not enter a password unless you want to change it.</small>{/if}
    <p><label for="password">Password</label>
       <input type="password" name="password" id="password" maxlength="255" value="{$user->password}" {$disabled}/></p>
    <p><label for="password">Password (confirm)</label>
       <input type="password" name="password_confirm" id="password_confirm" maxlength="255" value="{$user->password}" {$disabled}/></p>
  </div>
</fieldset>
{/if}

{if !$removed}
<p><input type="submit" value="{$mode} this User" />
   <input type="reset" value="Reset" /></p>
{/if}

{if $mode=="Edit"}{literal}
<script language="javascript">
$('PW').hide();
</script>
{/literal}{/if}